/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.logistics.entity.customsdeclaration;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.modules.base.entity.cars.Tcar;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 报关Entity
 * @author LV
 * @version 2021-03-10
 */
@Table(name="t_customs_declaration_detail", alias="a", columns={
		@Column(name="customs_declaration_detail_id", attrName="customsDeclarationDetailId", label="报关单明细ID", isPK=true),
		@Column(name="frame_number", attrName="frameNumber", label="车架号"),
		@Column(name="car_id", attrName="carId", label="车辆"),
		@Column(name="foreign_currency_price", attrName="foreignCurrencyPrice", label="外币价格"),
		@Column(name="declared_price", attrName="declaredPrice", label="申报价格", comment="申报价格（外币）"),
		@Column(name="tax_price", attrName="taxPrice", label="出税价格", comment="出税价格（RMB）"),
		@Column(name="customs_exchange_rate", attrName="customsExchangeRate", label="海关汇率"),
		@Column(name="customs_combined_tax_rate", attrName="customsCombinedTaxRate", label="海关综合税率"),
		@Column(name="import_duty", attrName="importDuty", label="进口关税"),
		@Column(name="import_consumption_tax", attrName="importConsumptionTax", label="进口消费税"),
		@Column(name="import_vat", attrName="importVat", label="进口增值税"),
		@Column(name="comprehensive_tax", attrName="comprehensiveTax", label="综合税金"),
		@Column(name="tax_amount", attrName="taxAmount", label="补税金额"),
		@Column(name="other", attrName="other", label="其他"),
		@Column(name="tax_price_f", attrName="taxPriceF", label="出税价格", comment="出税价格（外币）"),
		@Column(name="customs_declaration_id", attrName="customsDeclarationId.customsDeclarationId", label="报关单ID"),
		@Column(name="tax_clearance_id", attrName="taxClearanceId", label="通关缴税ID"),
		@Column(name="row_number", attrName="rowNumber", label="行号")
	}, joinTable={
        @JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= Tcar.class, attrName="tcar", alias="b",
                on="b.car_id = a.car_id", columns={
                @Column(name="car_id", label="车辆编码", isPK=true),
                @Column(name="car_name", label="车辆名称", isQuery=false),
				@Column(name="area", label="版型", isQuery=false),
        }),
}, orderBy="a.customs_declaration_detail_id ASC"
)
public class CustomsDeclarationDetail extends DataEntity<CustomsDeclarationDetail> {

	private static final long serialVersionUID = 1L;
	private String customsDeclarationDetailId;		// 报关单明细ID
	private String frameNumber;		// 车架号
	private String carId;		// 车辆
	private String carName;		// 车辆
	private Double foreignCurrencyPrice;		// 外币价格
	private Double declaredPrice;		// 申报价格（外币）
	private Double taxPrice;		// 出税价格（RMB）
	private String customsExchangeRate;		// 海关汇率
	private String customsCombinedTaxRate;		// 海关综合税率
	private Double importDuty;		// 进口关税
	private Double importConsumptionTax;		// 进口消费税
	private Double importVat;		// 进口增值税
	private Double comprehensiveTax;		// 综合税金
	private Double comprehensiveTax1;		// 综合税金
	private Double taxAmount;		// 补税金额
	private Double other;		// 其他
	private Double taxPriceF;		// 出税价格（外币）
	private Double taxPriceF1;		// 出税价格（外币）
	private CustomsDeclaration customsDeclarationId;		// 报关单ID 父类
    private Tcar tcar;
	private String taxClearanceId;
	private String customsDeclarationId2; //父类id
	private Long rowNumber;

	public String getTaxClearanceId() {
		return taxClearanceId;
	}

	public void setTaxClearanceId(String taxClearanceId) {
		this.taxClearanceId = taxClearanceId;
	}

	public CustomsDeclarationDetail() {
		this(null);
	}


	public CustomsDeclarationDetail(CustomsDeclaration customsDeclarationId){
		this.customsDeclarationId = customsDeclarationId;
	}

	public String getCustomsDeclarationDetailId() {
		return customsDeclarationDetailId;
	}

	public void setCustomsDeclarationDetailId(String customsDeclarationDetailId) {
		this.customsDeclarationDetailId = customsDeclarationDetailId;
	}

	@Length(min=0, max=100, message="车架号长度不能超过 100 个字符")
	public String getFrameNumber() {
		return frameNumber;
	}

	public void setFrameNumber(String frameNumber) {
		this.frameNumber = frameNumber;
	}

	@Length(min=0, max=64, message="车辆长度不能超过 64 个字符")
	public String getCarId() {
		return carId;
	}

	public void setCarId(String carId) {
		this.carId = carId;
	}

	public Double getForeignCurrencyPrice() {
		return foreignCurrencyPrice;
	}

	public void setForeignCurrencyPrice(Double foreignCurrencyPrice) {
		this.foreignCurrencyPrice = foreignCurrencyPrice;
	}

	@NotNull(message="申报价格不能为空")
	public Double getDeclaredPrice() {
		return declaredPrice;
	}

	public void setDeclaredPrice(Double declaredPrice) {
		this.declaredPrice = declaredPrice;
	}

	@NotNull(message="出税价格不能为空")
	public Double getTaxPrice() {
		return taxPrice;
	}

	public void setTaxPrice(Double taxPrice) {
		this.taxPrice = taxPrice;
	}

	@NotBlank(message="海关汇率不能为空")
	@Length(min=0, max=10, message="海关汇率长度不能超过 10 个字符")
	public String getCustomsExchangeRate() {
		return customsExchangeRate;
	}

	public void setCustomsExchangeRate(String customsExchangeRate) {
		this.customsExchangeRate = customsExchangeRate;
	}

	@NotBlank(message="海关综合税率不能为空")
	@Length(min=0, max=10, message="海关综合税率长度不能超过 10 个字符")
	public String getCustomsCombinedTaxRate() {
		return customsCombinedTaxRate;
	}

	public void setCustomsCombinedTaxRate(String customsCombinedTaxRate) {
		this.customsCombinedTaxRate = customsCombinedTaxRate;
	}

	@NotNull(message="进口关税不能为空")
	public Double getImportDuty() {
		return importDuty;
	}

	public void setImportDuty(Double importDuty) {
		this.importDuty = importDuty;
	}

	@NotNull(message="进口消费税不能为空")
	public Double getImportConsumptionTax() {
		return importConsumptionTax;
	}

	public void setImportConsumptionTax(Double importConsumptionTax) {
		this.importConsumptionTax = importConsumptionTax;
	}

	@NotNull(message="进口增值税不能为空")
	public Double getImportVat() {
		return importVat;
	}

	public void setImportVat(Double importVat) {
		this.importVat = importVat;
	}

	public Double getComprehensiveTax() {
		return comprehensiveTax;
	}

	public void setComprehensiveTax(Double comprehensiveTax) {
		this.comprehensiveTax = comprehensiveTax;
	}

	public Double getTaxAmount() {
		return taxAmount;
	}

	public void setTaxAmount(Double taxAmount) {
		this.taxAmount = taxAmount;
	}

	public Double getOther() {
		return other;
	}

	public void setOther(Double other) {
		this.other = other;
	}

	public Double getTaxPriceF() {
		return taxPriceF;
	}

	public void setTaxPriceF(Double taxPriceF) {
		this.taxPriceF = taxPriceF;
	}

	public CustomsDeclaration getCustomsDeclarationId() {
		return customsDeclarationId;
	}

	public void setCustomsDeclarationId(CustomsDeclaration customsDeclarationId) {
		this.customsDeclarationId = customsDeclarationId;
	}

    public Tcar getTcar() {
        return tcar;
    }

    public void setTcar(Tcar tcar) {
        this.tcar = tcar;
    }

    public String getCarName() {
        return carName;
    }

    public void setCarName(String carName) {
        this.carName = carName;
    }

    public Double getTaxPriceF1() {
        return taxPriceF1;
    }

    public void setTaxPriceF1(Double taxPriceF1) {
        this.taxPriceF1 = taxPriceF1;
    }

    public Double getComprehensiveTax1() {
        return comprehensiveTax1;
    }

    public void setComprehensiveTax1(Double comprehensiveTax1) {
        this.comprehensiveTax1 = comprehensiveTax1;
    }

	public Long getRowNumber() {
		return rowNumber;
	}

	public void setRowNumber(Long rowNumber) {
		this.rowNumber = rowNumber;
	}
}
